Added regression functionality