Modified from https://github.com/hikalkan/scs/blob/master/LICENSE