added support for exception handling
added bounded instances