Modified the constructor to accept up to 4 arguments.