added implicit none statements