removed unused functions and updated comments