some adaptions. don't use this! just working here and hackish!