added comments, need to change the structure