modified build method