removed duplicate code and made bundle attributed protected