cleaned up version of swe_simple