tidying up constructor