added exception class in lib, added scheduling interface