Updated so it can run on startup