tested to make sure it runs correctly