modification to allow replacement of menu actions