fixed cost function to forget dir at end floor