using zach's code