implemented functions