base framework code