created js functionality and working CSS grid