css changes and more logical approach