finish implementation of basic functionality