adding font fonctionality and optimizing some functions