Make hga more flexible