Creating Object Using Function Loops