added utils and prettyfied code