fixed function to do its job