optimized and ready for final added functionality and testing