gradient view constructor method added