Add record function implemented