code a bit more clean