bug fixes, added user interactio