main framework