added fetch and retrieve func