write methods updated and segregated