updated run method