elematlock is doing it better, so I changed some things to match