added terminator, some formatting