trying to get this terrible library to work correctly