make it more complex and doesnt work any more, with event