basic functionality is now in place, bugfixes