removed redundant code and added better comments