refator code format