Change the type of x and y
Fix normalise method