slight change on run() function