start creating layer update logic with factory design pattern