WIP - implemented some active record logic