basic functionality and rails integration