adding comments and inverse logic