add third method using slice