code should work now, but locally have problems with libs ruby needs so i'm currently unable to test it