function should have returned value for all path