added updated code and uploaded to GitHub correctly (hopefully)