cleaned up api a bit