fixed bugs and improved presentation