made background code actually work