Add coment; optimize code