changed resolution, played around with inputs and got rid of the redundancy with calculating neighbours by putting that in the main program