subroutines edited for alaska