This function and the constructor could use some formatting, e.g. put the parameters on new lines - just a style thing though