Updated for a more complex usecase