add unit tests for physics and rules