partially updated implementation