cleaned up hack a little