Modernized version of crushh87's FP.