added the code for UI