added comments and example input