implemented
added comments