credits: This was done as part of my ADSR 5 challenge 4