moved source and fixed pointer input init