Added existing pieces of code