found some bugs. Collision in frame works as expected. Need to work on moving balls before and after the collisions in a frame. it seems to be buggy