wrote methods for Light class.