followed along with some style changes