add checkstyle and fiind bugs