Edited and added comments