added common_functions and few more changes