clean up createMenu function [WIP]