added functionality for ui