added new way of doing parallel code