the force subroutine edited for the main program