refactored, looking more like an OS