Adding test for combine function and converting it to return an object