Script adapted from
SPA
by Bretzel (C) 2010