started adding other APIs & refactored code