comments and optimize