bugfixes and script now uses (some) properties