added idle support (doesn't work atm and breaks working functions)