optimize performance and add functions