My modifications. Not working very well.