reworking interfaces and bug fixes