Finished inplementation of formatting