code for parent app