almost there...procedural programming has its moments!