entire app rewritten through dynamic getData function