changed grid style and some functionality