-moved rochade calculation to function