more changes to make it generic