methods example codes