implemented following functions