Some appending logic added