restructuring to make it more flexible