conformed to most of the checkstyle rules