added json handler in own class
added exceptions for not found and invalid method