simplfy the code; add color