make action register more generic