using a factory in magic splsubject