remove console log and, I did some code refactor