tests and added exception