changes in code a bit