added functionality in pixel class