huge update regarding the use of pseudo objects!
variable casting fix