changed long to int in removecompetence function