more non relevant code removed