Build instance with attributes

Fix #5