added _constant method and a new sample