use functions or class methods