fixed bugs and added styles