add mark and record function