added another function to rest api