adds setup and run loop