got loop almost there