Anonymous function wrapped and added a bit of design tweaking