adding modular untility functions to de-clutter draw api function