reformatting console code