more work on properties
added a somehow working property version (ugliest ccode alive)