added shared functionality