Added an offset for every coordinate and got rid of max_voltage variable