better api modularization