added more functionality in jack.cpp