CHANGED:sort of name changes made and function definition