refac, enforce code style, new helper methods