added comments and copyright