Remove sql query. Use Active Record class instead