public static String moveToAlgebra(String move){
		int start = 0, end = 0;
		char a = move.charAt(0), b = move.charAt(1), c = move.charAt(2), d = move.charAt(3);
		String algebraicMove = "";
		
    	if (Character.isDigit(d)){
			start = (a - 48) * 8 + (b - 48);
			end = (c - 48) * 8 + (d - 48);
    	} else if (d == 'P'){
			if (Character.isUpperCase(c)){
				start = Long.numberOfTrailingZeros(MoveGenerator.FILES[a - 48] & MoveGenerator.RANKS[6]);
				end = Long.numberOfTrailingZeros(MoveGenerator.FILES[b - 48] & MoveGenerator.RANKS[7]);
			} else {
				start = Long.numberOfTrailingZeros(MoveGenerator.FILES[a - 48] & MoveGenerator.RANKS[1]);
				end = Long.numberOfTrailingZeros(MoveGenerator.FILES[b - 48] & MoveGenerator.RANKS[0]);
			}
			algebraicMove = "" + Character.toLowerCase(c);
    	} else if (d == 'E'){
    		if (c == 'W'){
    			start = Long.numberOfTrailingZeros(MoveGenerator.FILES[a - 48] & MoveGenerator.RANKS[4]);
    			end = Long.numberOfTrailingZeros(MoveGenerator.FILES[b - 48] & MoveGenerator.RANKS[5]);
    		} else {
    			start = Long.numberOfTrailingZeros(MoveGenerator.FILES[a - 48] & MoveGenerator.RANKS[3]);
    			end = Long.numberOfTrailingZeros(MoveGenerator.FILES[b - 48] & MoveGenerator.RANKS[2]);
    		}
    	} else if (d == 'C'){
    		if (a == 'W'){
    			start = 60;
    			if (b == 'K') end = 62;
    			else end = 58;
    		} else {
    			start = 4;
    			if (b == 'K') end = 6;
    			else end = 2;
    		}
    	}
    	else System.out.println("INVALID MOVE");
    	
    	return "" + (char)('a' + (start % 8)) + (char)('8' - (start / 8)) + (char)('a' + (end % 8)) + (char)('8' - (end / 8)) + algebraicMove;
	}