working on some bug fixes