implemented two missing functions