rename function action() to prepare()