implement init object in element constructor