working unorganized code