added regression code