added a createApp function