added ability to add and resize layers