change orm to active record