revision + added comments