clean + comments + refactor