changed unit functions to complex. added basic plot