ok trying to refactor again. in this time I'm keeping the initialization in my mind, so I hope it will not crash again.