make this a little smarter