fixed jshintrc, added controller logic