code practice for inter view