moved recording program here, working version