almost complete of register except the database stub