check code actually work
updates from comments from mitch