author: Mister Sinister
thanks to Eddy Zykov for beta-testing