before run method