small changes;
em2d not working