Added h,s as inputs, still needs testing!