moved db findOne to record findOne