supplement code and formatting done