fixed bug in Formation.java