adding layout functionality