added comments to explain strange methods