added some style & logic