code developed for coursera assignments