broke out write validation