updated with spark