Converted all to generic functions for unspecified data