throws exceptions when not successfull