added declaring static functions as static