update with new refactory code and ui