added comments and example typing