updated license and added comments