added world borders and collision resolving