added implicit euler for debugging