test and removing unused funcitons