hardcoded speed replaced with user settings