in and out routines outlined, order needs to be fixed