arranging the errors in genericfunctions