added gradient sample