moved function to better fit SSE requirement