added action handler and formatted chart