whoops, wrong closing function