this is a smarter way of doing things