made install function work, debug mode is working now too