API needs to be more generic