optimize: downsong function

replace many grep's, cut's and sed's with single awk