updated after feedback from @ctrlbreak