fleshing more logic for user interface part