added libraries and ui code