fix bugs extend some parts and integrate calendar