trading routines