loading records from database