reworked js, create grid