first steps towards modular implementation