added rem calc function, updated layouts