database write bug fixes #7
added class forward of UIViewController fixes #5