added interface, type checking, changed types of values