app frontend logic