refactored and reformatted attribute writer rests