code ready to convert to app