working a little better now - code is sloppy