added total code for base app