non relevant code removed