aaarg... I hate this api