this helper is very hacky