polished by comments