adding support for 0-indexed buildings, fixes #18