changed viewChange() function to account for gcm and rcp