ugly version without module