added else condition for unrearchable code path