Getting rid of throw exeption