there must be a smarter approach