declare pressedAction and sound as optional