commenting code, removing redundant function