fixed UI and added pagination