finished code format