renaming input ports and added bilateral filter