update modules function to call tasks api