shell interaction now loops + code refactored