physics changes and added scoring function