Fixed bug in pyjs funcyion and added increments