make var names more consistent
fix conflict + update API