changed function prototype a bit