cleaning this up a little bit...