better handling of route