set up interface and organized functions