updated sample handlers to work more or less