add new codes for app framework