code tested without hardcoded address, it definitely works now