Implemented speed limit function