bug fixes and added features