completed functionality; waiting for ui stuff