refactored most of it
added grid colors to input file