some refactoring & css added, all test passed