removed switch block in to()