added code to make app more responsive