added a color parameter to the text() function