extract common methods