some tweaking (Promise had a problem in opera, hacked a solution)