added programsize and implemented some functions for the mag3110