Separate action code to owm functions prepareAction and callAction