updated for bug fixes