added some interfaces and some minor bug fixes