tried using strings instead of appends to be faster