Fixed according to prof's comment