added magic and some stuff about actions