better approach
get it working for sample 1