adding rudimentary error handling and console colors