updated ui and code