add comment and per functions