dryed up code for 5, much better