need to check before returning path