reverting last commit, replacing with solution from 31