sharing general prupose method