Changed code as per comment