chagned static functions to non static