improves menu click handling with delegate and replaces z-index