Added custom retrieve function