Added and tweaked some of the original