major functions polished