added function
added cores