added comments and path building