there must be a better way of doing this, still searching