cleaning from previous comments
added default parameter values
performance improvement using reinterpret_cast