working the database stuff. making it look like active record