change append to after func