Own version of active record