more robust code and squashed bugs