loc added some functions