cant figure out whats wrong, new pseudocode attempt