added implementations and fixed a typo