added npm support for atan2