add classification function