need to change append on each iteration to append once after cycle