added complex create function