Implemented proper client-side prediction