changed graphics interface to double